| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import Validator from '@hckrnews/validator'; |
||
| 30 | setValues({ value, type }) { |
||
| 31 | this.value = value; |
||
| 32 | this.type = type; |
||
| 33 | this.date = new Date(); |
||
| 34 | |||
| 35 | if (!this.validate()) { |
||
| 36 | this.type = Error; |
||
| 37 | this.message = 'Invalid error'; |
||
| 38 | this.value = { errors: validator.errors, values: this.values }; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 61 |